![]() 03/27/2019 at 14:53 • Filed to: Project RAUX Box, Electronics, arduino | ![]() | ![]() |
The first stage of !!!error: Indecipherable SUB-paragraph formatting!!! was simply to get my development toolchain set up, because I haven’t done any serious embedded programming for five or so years. As you can see from the GIF, I’ve done it! You can tell because the blink pattern is not the typical one second on, one second off.
Yes, blinking an LED counts as victory in computerland. Don’t do computers, kids!
I use the Arduino/AVR toolchain, but I prefer to do it outside of the official Arduino IDE because I need mah vim. As I expected, there have been changes to the official IDE’s internals that necessitated finding a new Makefile to do the compiling & uploading, but those changes happened a while ago so that wasn’t hard. The only tricky bit was figuring out exactly which board & bootloader settings I needed to choose for my cheap knockoff board. But all in all it was well under half an hour to get that sweet, sweet LED blinkage.
Now I can move on to a more interesting part: encoding the analog signal to digital using this here audio processing breakout board:
That’ll look roughly like this:
Solder some header pins to the Arduino clone and breakout board
Connect the two pins for the I2C control channel between the two boards, either on a breadboard or using jumper wires (and put in VCC/GND for the audio board)
Spend some quality time with !!!error: Indecipherable SUB-paragraph formatting!!! .
Write some code to configure the audio processing chip to do nothing but encode the analog in to digital, in right-justified 16-bit I2S format (bypassing the signal processing functionality of the chip).
The problem with this plan is that I don’t have a good way to test it out at the end. I do have a Salae logic analyzer, but I’m not sure whether it supports I2S. If it doesn’t, then I gotta go find someone who’ll let me use their oscilloscope (I don’t do this sort of thing enough to justify buying an oscilloscope).
I hope to make progress on Stage Two this weekend. Stay tuned.
![]() 03/27/2019 at 15:04 |
|
Yes, blinking an LED counts as victory in computerland.
It’s the hello world of embedded computing.
![]() 03/27/2019 at 15:07 |
|
I2s or I2c?
![]() 03/27/2019 at 15:33 |
|
Both are involved. The audio output is I2S. The control channel to configure the audio chip is I2C (though SPI also available, but I think I have to modify the board to toggle which way one of the pin’s chips is being pulled).
![]() 03/27/2019 at 16:13 |
|
https://www.crowdsupply.com/excamera/i2cdriver
https://www.crowdsupply.com/excamera/spidriver
![]() 03/27/2019 at 17:22 |
|
Where’s the fun in that?
![]() 03/27/2019 at 17:56 |
|
I have the spidriver, and it's awesome.
![]() 03/27/2019 at 18:10 |
|
Good to know it’s an option, in case I get stuck and my logic analyzer doesn’t help me get un-stuck.